package guoanmaker.operator.business.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Lob;
import javax.persistence.Table;

import guoanmaker.operator.business.modelnobind.PatentRo;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@AllArgsConstructor
@NoArgsConstructor
@Data
@Entity
@Table(name = "t_temp_patent")
public class Patent{
	@Id
	@Column(name = "id", nullable = false)
	private String id;// 专利唯一ID
	@Column(name = "user_id")
	private String userId;// 用户id
	@Column(name = "title")
	private String title;// 专利名称4
	@Lob
	@Column(name = "summary")
	private String summary;// 备注
	@Column(name = "applicant")
	private String applicant;// 申请人
	@Column(name = "inventor")
	private String inventor;// 发明人
	@Column(name = "application_date")
	private String applicationDate;// 申请日期
	@Column(name = "type")
	private String type;// 类型
	@Column(name = "agency")
	private String agency;// 代理公司
	@Column(name = "legal_status")
	private String legalStatus;// 法律状态
	@Column(name = "first_inventor")
	private String firstInventor;// 第一发明人
	@Column(name = "first_applicant")
	private String firstApplicant;// 第一申请人
	@Column(name = "image_path")
	private String imagePath;// 图片url前缀(https://www.patenthub.cn)
	@Column(name = "publication_date")
	private String publicationDate;// 公开日期
	
	public Patent(String userId,PatentRo patentRo){
		this.userId = userId;
		this.id = patentRo.getId();
		this.title = patentRo.getTitle();
		this.summary = patentRo.getSummary();
		this.applicant = patentRo.getApplicant();
		this.inventor = patentRo.getInventor();
		this.type = patentRo.getType();
		this.agency = patentRo.getAgency();
		this.legalStatus = patentRo.getLegalStatus();
		this.firstInventor = patentRo.getFirstInventor();
		this.imagePath = patentRo.getImagePath();
		this.publicationDate = patentRo.getPublicationDate();
		this.applicationDate = patentRo.getApplicationDate();
		this.firstApplicant = patentRo.getFirstApplicant();
	}
}
